import sys
from myutils import batch_rename,clean_txt_files
def main():
    if len(sys.argv) < 3:
        print("Usage: python main.py <command> <directory>")
        print("Commands: rename | clean")
        return
    command = sys.argv[1]
    directory = sys.argv[2]
    if command == "rename":
        batch_rename(directory)
    elif command == "clean":
        clean_txt_files(directory)
    else:
        print(f"未知的命令：{command}")

# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    main()

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
